<div id="menu" class="ui-helper-reset ui-widget ui-state-default" style="height: 24px;">
	<ul id="nav-bar">
		<li class="ui-state-default {if !isset($smarty.request.list)}ui-state-active{/if}">
			<a href="home">
				Domov
			</a>
		</li>
		{notAdmin}
			<li class="ui-state-default {if isset($smarty.request.list) && $smarty.request.list == 'tracking'}ui-state-active{/if}">
				<a href="?list=tracking">
					Sledovania
				</a>
			</li>
		{/notAdmin}
		<li class="ui-state-default {if isset($smarty.request.list) && $smarty.request.list == 'warnings'}ui-state-active{/if}">
			<a href="?list=warnings">
				Upozornenia<span id="warning_count" class="ui-state-highlight" style="padding-left: 5px; padding-right: 5px;">.</span>
			</a>
		</li>
	</ul>	
</div>
{literal}
	<script type="text/javascript">
		$(function(){
			$("ul#nav-bar li a").bind({
				mouseenter: function(){
			    	$(this).parent().addClass("ui-state-hover");
			 	},	
			 	mouseleave: function(){
			    	$(this).parent().removeClass("ui-state-hover");
			 	},	
			})
			
			$.ajax({
			url: AJAX_URL,
			data:{
				controller: "home",
				action: "getWarningCount"
			},
			success: function(data){
				$("#warning_count").html(data);
			}
		});
		})
	</script>
{/literal}
